package com.kly.sc.api.application.controller.im;

import com.kly.sc.api.application.controller.im.response.IMPopResponse;
import com.kly.sc.api.application.controller.im.response.TipsResponse;
import com.kly.sc.api.application.helper.RequestLocalInfo;
import com.kly.sc.api.application.service.user.IMNoticeService;
import com.kly.sc.api.application.service.utils.BaseComponent;
import com.kly.sc.api.application.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/api/im/notice")
@Api(value = "/api/im/notice", tags = "im聊天")
public class IMNoticeController extends BaseComponent {


    @Resource
    private IMNoticeService imNoticeService;

    @GetMapping("/getIMPop")
    @ApiOperation(value = "M私聊触发提醒-Meboo弹窗", notes = "M私聊触发提醒-Meboo弹窗")
    public Result<IMPopResponse> getIMPop(@RequestParam @ApiParam("用户发送消息数") Integer userMessageNum) {
        return imNoticeService.getIMPop(userMessageNum);
    }


    @GetMapping("/getTips")
    @ApiOperation(value = "IM私聊触发提醒-聊天tips", notes = "IM私聊触发提醒-聊天tips")
    public Result<TipsResponse> getTips(@RequestParam @ApiParam("会话类型 1有效会话 2深度会话 3最大会话上限") Integer conversationType) {
        return imNoticeService.getTips(conversationType);
    }

}
